---
meta_title: Durable Meeting Summary with Restate
meta_description: "Building a fault-tolerant audio transcription pipeline using Restate workflows, Deepgram callbacks, and rate limiting."
author: "Yujong Lee"
created: "2025-11-28"
published: false
---

## TL;DR

## The Problem

## Architecture Overview

```mermaid
sequenceDiagram
    participant Client as Web Client
    participant Server as TanStack Server
    participant Restate as Restate Workflow
    participant RateLimiter as RateLimiter
    participant Deepgram as Deepgram API

    Client->>Server: Upload audio file
    Server->>Server: Store file, get audioUrl
    Server->>Restate: workflowSubmit(userId, audioUrl)
    
    Note over Restate: Status: QUEUED
    
    Restate->>RateLimiter: checkAndConsume(windowMs: 60s, max: 5)
    
    alt Rate limit exceeded
        RateLimiter-->>Restate: TerminalError(429)
        Restate-->>Server: Error
    else Within limit
        RateLimiter-->>Restate: OK (count incremented)
    end
    
    Note over Restate: Status: TRANSCRIBING
    
    Restate->>Deepgram: transcribeUrlCallback(audioUrl, callbackUrl)
    Deepgram-->>Restate: request_id
    
    Note over Restate: Waiting for callback...
    
    Deepgram->>Restate: POST /onDeepgramResult (transcript)
    Restate->>Restate: promise("deepgram-result").resolve(transcript)
    
    Note over Restate: Status: DONE
    
    Restate-->>Server: { status: DONE, transcript }
    Server-->>Client: Pipeline complete
```

## Rate Limiting with Restate Virtual Objects

[Restate Rate Limiting Guide](https://docs.restate.dev/guides/rate-limiting)

## The Workflow Implementation

### Pipeline States

### Deepgram Callback Pattern

### Error Handling

## Why Restate?

## References

- [Restate SDK for Cloudflare Workers](https://docs.restate.dev/develop/ts/cloudflare-workers)
- [Restate Rate Limiting Guide](https://docs.restate.dev/guides/rate-limiting)
- [Deepgram Callback Transcription](https://developers.deepgram.com/docs/callback)
- [apps/restate source code](https://github.com/fastrepl/hyprnote/tree/main/apps/restate)
